package com.gwt.cloud.constant;

public enum ApiResultEnum {
    SUCCESS(200, "Success"),
    FAIL(-1, "Error"),
    FAIL_OUT(-100, "外部接口请求失败！"),
    FAIL_PARAMS(-101, "接口参数不能为空!"),
    FAIL_PARAMS_TYPE(-102, "接口参数类型错误！"),
    UPLOAD_FILE_ERROR(-201, "文件上传失败！"),
    UPLOAD_TYPE_ERROR(-202, "上传文件类型配置错误！"),
    MAX_FILE_SIZE(-203, "上传文件超过最大限制！"),
    FILE_TYPE_ERROR(-204, "文件类型不允许上传！"),
    LOCAL_UPLOAD_FILE_ERROR(-205, "本地存储上传文件失败！"),
    SHAM_TOKEN(-400, "token无效，请求拒绝！"),
    LOGIN_EXPIRE(-401, "会话超时，请重新登录！"),
    BLACK_LIST(-402, "未经授权，禁止访问！"),
    ACCESS_REFUSE(-403, "权限不足，拒绝访问！"),

    ;

    ApiResultEnum(Integer status, String message) {
        this.status = status;
        this.message = message;
    }

    private final Integer status;

    private final String message;

    public Integer getStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }
}
